//
// #001015 重新编写温度转换程序，使用函数实现温度转换计算
//
// Created by DongPan on 7/26/2022.
//
#include <stdio.h>

float ceisius(float fahr);

int main(void)
{
    float fahr;
    int lower, upper, step;

    lower = 0;
    upper = 300;
    step = 20;

    fahr = lower;
    while (fahr <= upper) {
        printf("%3.0f %6.1f\n", fahr, ceisius(fahr));
        fahr = fahr + step;
    }

    return 0;
}

float ceisius(float fahr)
{
    return (5.0/9.0) * (fahr - 32.0);
}
